﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Web.UI;

namespace Medianamik.UI.Controls
{
    public class ComboTreeWithPostBack : ComboTree
    {
        void TreeNodeClick(object sender, RadTreeNodeEventArgs e)
        {
            OnValueChanged(new ValueChangedEventArgs(Tree.SelectedNode.Value));
            Combo.Items[0].Text = Tree.SelectedNode.Text;
        }

        protected override void CreateControlHierarchy(bool useDataSource)
        {
            base.CreateControlHierarchy(useDataSource);
            Tree.NodeClick += new RadTreeViewEventHandler(TreeNodeClick);
        }
    }
}
